<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>居民死亡医学证明（推断）书</title>
  <style>
    /* 全局样式优化 */
    * {
      margin: 0;
      padding: 0;
    }
    
    body {
      font-family: "SimSun", "仿宋", serif;
       background: linear-gradient(135deg, #e0f0ff, #f5f9ff);
      color: #000;
      padding: 20px;
      line-height: 1.6;
    }
    
    .container {
      max-width: 1000px;
      margin: 0 auto;
      background: white;
      box-shadow: 0 0 10px rgba(0,0,0,0.1);
      padding: 30px;
      position: relative;
    }
    
    /* 标题区域样式 */
    .header {
      text-align: center;
      margin-bottom:5px;
	  font-weight: bold;
    }
    
    .header h2{
      margin: 5px 0 ;
      font-weight: bold;
      font-size: 24px;
     font-family: Georgia, 'Times New Roman', Times, serif;
    }
    
    
    .title-note {
      font-size: 12px;
      color: #666;
      margin-top: 5px;
    }
    
    /* 行政区域样式优化 */
    .admin-info {
/*      margin-bottom: 15px */;
      font-size: 12px;
    }
    
    .form-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 8px;
    }
    
    .form-col {
      flex: 1;
    }
    
    .form-col label {
      display: inline-block;
    }
    
    .form-col span {
      font-weight: bold;
      display: inline-block;
      min-width: 40px;
      text-align: center;
      border-bottom: 1px solid #333;
      /* margin: 0 5px; */
      /* padding: 0 5px; */
    }
    
    /* 表格样式优化 */
    table {
      width: 100%;
      border-collapse: collapse;
      /* margin-bottom: 15px; */
      table-layout: fixed;
      font-size: 12px;
    }
    
    table, th, td {
      border: 1px solid #333;
      padding: 1px 5px;
    }
    
    th {
/*      background-color: #f5f5f5 */;
      text-align: center;
      font-weight: normal;
      line-height: 1.5;
    }
    
    td {
      vertical-align: middle;
      line-height: 1.7;
    }
    
    .form-field {
      min-height: 28px;
      display: flex;
      align-items: center;
      padding: 0 5px;
    }
    
    /* 部分标题样式 */
    .section-title {
      text-align: center;
      font-size: 16px;
      font-weight: bold;
    }
    
    .section-title::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 10%;
      width: 80%;
      height: 1px;
      background: linear-gradient(to right, transparent, #333, transparent);
    }
    
    /* 备注区域样式 */
    .notes {
      margin-top: 15px;
      padding: 10px 15px;
      background-color: #f9f9f9;
      border: 1px solid #e0e0e0;
      font-size: 12px;
      line-height: 1.8;
    }
    
    .notes p {
      margin-bottom: 5px;
    }
    
    /* 按钮区域样式 */
    .controls {
      margin: 25px 0 15px;
      display: flex;
      justify-content: center;
      gap: 20px;
    }
    
    button {
      padding: 8px 25px;
      background: #2c6aa0;
      color: white;
      border: none;
      border-radius: 3px;
      cursor: pointer;
      font-size: 14px;
      font-family:  "宋体", "SimSun",serif;
      transition: background 0.3s;
      box-shadow: 0 2px 3px rgba(0,0,0,0.1);
    }
    
    button:hover {
      background: #1a4d78;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    /* 打印样式优化 */
    @media print {
      body {
        padding: 0;
        background: white;
      }
      
      .container {
        box-shadow: none;
        padding: 15px;
        max-width: 100%;
      }
      
      .controls {
        display: none;
      }
      
      button {
        display: none;
      }
      
      .notes {
        border: none;
        background-color: transparent;
        padding: 5px 0;
      }
    }
    
    /* 移动端适配 */
    @media (max-width: 768px) {
      .container {
        padding: 15px;
      }
      
      .form-row {
        flex-direction: column;
      }
      
      .controls {
        flex-direction: column;
        align-items: center;
      }
    }
    
    /* 特殊单元格样式 */
    .signature-area {
      padding: 10px;
      min-height: 80px;
    }
    
    .signature-line {
      float: right;
      padding: 0px 20px 0 0;
    }
    
    /* 增强可读性 */
    tr:nth-child(even) {
      /* background-color: #fafafa; */
    }
    
    td:empty::after {
      content: " ";
      display: inline-block;
      width: 100%;
    }
	/* 新增：第一联标签样式 */
	    .vertical-label {
	      position: absolute;
	      left: -20px;
	      top: 50%;
	      transform: translateY(-50%);
	      writing-mode: vertical-lr;
	      text-orientation: upright;
	      font-size: 12px;
	      white-space: nowrap;
		  letter-spacing: 5px;
		  
	    }
	    
	    /* 新增：表格容器样式 */
	    .table-wrapper {
	      position: relative;
	      margin-top: 5px;
	    }
		/* 新增：格子样式 */
		    .grid-container {
		      display: inline-flex;
		      gap: 2px;
		      margin-left: 5px;
		      vertical-align: middle;
		    }
		    
		    .grid-item {
		      width: 15px;
		      height: 15px;
		      border: 1px solid #aaa;
		      text-align: center;
		      line-height: 15px;
		      display: inline-block;
		    }
			
			/**/
			.actions {
			    display: flex;
			    justify-content: center;
			    gap: 20px;
			    padding: 20px;
			    background: #f9fbfd;
			    border-bottom: 1px solid #eaeaea;
			}
			
			.action-btn {
			    padding: 12px 30px;
			    border: none;
			    border-radius: 30px;
			    font-weight: 500;
			    cursor: pointer;
			    display: flex;
			    align-items: center;
			    gap: 8px;
			    transition: all 0.3s ease;
			    font-size: 16px;
			    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
			}
			
			.print-btn {
			    background: linear-gradient(135deg, #ff9800, #f57c00);
			    color: white;
			}
			
			.reset-btn {
			    background: linear-gradient(135deg, #607d8b, #455a64);
			    color: white;
			}
			
			.submit-btn {
			    background: linear-gradient(135deg, #28a745, #218838);
			    color: white;
			}
			
			.action-btn:hover {
			    transform: translateY(-3px);
			    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
			}
			
  </style>
</head>
<body>
  <div class="container">
    <!-- 标题区域 -->
    <div class="header">
      <h2>居民死亡医学证明（推断）书</h2>
    </div>
    <!-- 省份/城市/县区 -->
    <div class="admin-info">
      <div class="form-row">
        <div class="form-col">
          <label><span>河南</span>省（自治区、直辖市）</label>
          <label><span>洛阳</span>市（地区、州、盟）</label>
          <label><span>老城</span>县（区、旗）</label>
        </div>
      </div>
      
      <div class="form-row">
        <div class="form-col">
         <label>行政区划代码
                     <div class="grid-container">
                       <div class="grid-item">4</div>
                       <div class="grid-item">1</div>
                       <div class="grid-item">0</div>
                       <div class="grid-item">3</div>
                       <div class="grid-item">0</div>
                       <div class="grid-item">2</div>
                     </div>
		 </label>
         <label style="float: right;">编号
                     <div class="grid-container">
                       <div class="grid-item">2</div>
                       <div class="grid-item">0</div>
                       <div class="grid-item">2</div>
                       <div class="grid-item">3</div>
                       <div class="grid-item">0</div>
                       <div class="grid-item">7</div>
                       <div class="grid-item">0</div>
                       <div class="grid-item">1</div>
                       <div class="grid-item">0</div>
                       <div class="grid-item">0</div>
                       <div class="grid-item">1</div>
                       <div class="grid-item">-</div>
                       <div class="grid-item"></div>
                       <div class="grid-item"></div>
                       <div class="grid-item"></div>
                       <div class="grid-item"></div>
                       <div class="grid-item"></div>
                     </div>
         </label>
        </div>
      </div>
    </div>
    
    <!-- 个人信息表格 -->
	<div class="table-wrapper">
		<div class="vertical-label">第一联  填写单位存根</div>
    <table>
      <tr>
        <th style="width: 13%">死者姓名</th>
        <td style="width: 16%"><div class="form-field">张某某</div></td>
        <th style="width: 10%">性别</th>
        <td style="width: 20%"><div class="form-field">男</div></td>
        <th style="width: 10%">民族</th>
        <td style="width: 13%"><div class="form-field">汉</div></td>
        <th style="width: 12%">国家或地区</th>
        <td style="width: 11%" colspan="2"><div class="form-field">中国</div></td>
      </tr>
      <tr>
        <th>有效身份<br>证件类别</th>
        <td><div class="form-field">身份证</div></td>
        <th>证件号码</th>
        <td>410302********1234</td>
        <th>年龄</th>
        <td><div class="form-field">78岁</div></td>
        <th >婚姻状况</th>
        <td colspan="2"><div class="form-field">已婚</div></td>
      </tr>
      <tr>
        <th>出生日期</th>
        <td ><div class="form-field">1945年3月12日</div></td>
        <th>文化程度</th>
        <td><div class="form-field">高中</div></td>
        <th>个人身份</th>
        <td colspan="4"><div class="form-field">退休人员</div></td>
      </tr>
      <tr>
        <th>死亡日期</th>
        <td><div class="form-field">2023年7月1日 10:25</div></td>
        <th>死亡地点</th>
        <td colspan="2"><div class="form-field">医疗卫生机构</div></td>
        <th colspan="2">死亡时是否处于妊娠期或<br>妊娠终止后42天内</th>
        <td colspan="2"><div class="form-field">否</div></td>
      </tr>
      <tr>
        <th>生前工作单位</th>
        <td ><div class="form-field">洛阳市机械厂</div></td>
        <th>户籍地址</th>
        <td colspan="2"><div class="form-field">河南省洛阳市老城区XX街道XX号</div></td>
        <th>常住地址</th>
        <td colspan="3"><div class="form-field">河南省洛阳市老城区XX街道XX号</div></td>
      </tr>
      <tr>
        <th>可联系的<br>家属姓名</th>
        <td><div class="form-field">张某某</div></td>
        <th>联系电话</th>
        <td  colspan="2"><div class="form-field">138****5678</div></td>
        <th >家属住址<br>或工作单位</th>
        <td colspan="3"><div class="form-field">河南省洛阳市老城区XX街道XX号</div></td>
      </tr>
      <tr>
        <th colspan="2">致死的主要疾病诊断</th>
        <th colspan="4">疾病名称（勿填症状体征）</th>
        <th colspan="3">发病至死亡大概间隔时间</th>
      </tr>
      <tr>
        <td colspan="2"> I.（a）直接死亡原因</td>
        <td colspan="4"><div class="form-field">急性心肌梗死</div></td>
        <td colspan="3"><div class="form-field">2小时</div></td>
      </tr>
      <tr>
        <td colspan="2">（b）引起（a）的疾病或情况</td>
        <td colspan="4"><div class="form-field">冠状动脉粥样硬化性心脏病</div></td>
        <td colspan="3"><div class="form-field">5年</div></td>
      </tr>
      <tr>
        <td colspan="2">（c）引起（b）的疾病或情况</td>
        <td colspan="4"><div class="form-field">高血压</div></td>
        <td colspan="3"><div class="form-field">15年</div></td>
      </tr>
      <tr>
        <td colspan="2">（d）引起（c）的疾病或情况</td>
        <td colspan="4"><div class="form-field">—</div></td>
        <td colspan="3"><div class="form-field">—</div></td>
      </tr>
      <tr>
        <td colspan="2">II. 其他疾病诊断（促进死亡，但与导致死亡无关的其他重要情况）</td>
        <td colspan="7"><div class="form-field">2型糖尿病</div></td>
      </tr>
      <tr>
        <th>生前主要疾病<br>最高诊断单位</th>
        <td colspan="4"><div class="form-field">三级医院</div></td>
        <th>生前主要疾病<br>最高诊断依据</th>
        <td colspan="3"><div class="form-field">临床+理化</div></td>
      </tr>
      <tr>
        <td >医师签名</td>
        <td><div class="form-field">李医生</div></td>
        <td colspan="3">医疗卫生机构盖章：<span>洛阳市中心医院</span></td>
        <td colspan="4">填表日期：<span>2023年7月1日</span></td>
      </tr>
      <tr>
        <td colspan="5">(以下由编码人员填写) 根本死亡原因： <span>冠状动脉粥样硬化性心脏病</span></td>
        <td colspan="4"><div class="form-field">ICD编码：I25.1</div></td>
      </tr>
    </table>
    </div>
    <!-- 死亡调查记录 -->
	<div class="header">
	  <h2>死亡调查记录</h2>
	</div>
    <table>
      <tr>
        <td  colspan="9" class="signature-area" >
          <p><strong>死者生前病史及症状体征：</strong></p>
          <div>患者5年前确诊冠心病，长期服药治疗。近2周自觉胸闷、气短症状加重，未及时就医。今晨7时许突发胸骨后压榨性疼痛，伴大汗淋漓、面色苍白，家属呼叫120送至我院急诊。查体：血压80/50mmHg，心率45次/分，心电图示急性广泛前壁心肌梗死。立即给予抢救治疗，患者于10时25分呼吸心跳停止，宣告临床死亡。</div>
          <p class="signature-line">以上情况属实，被调查者签字：<span>张某某</span></p>
        </td>
      </tr>
      <tr>
        <th colspan="1" style="width: 13%">被调查者<br>姓名</th>
        <td colspan="1"><div class="form-field">张某某</div></td>
        <th colspan="1">与死者关系</th>
        <td colspan="1"><div class="form-field">父子</div></td>
        <th colspan="1">联系电话</th>
        <td colspan="1"><div class="form-field">138****5678</div></td>
        <th colspan="1">联系地址<br>或工作单位</th>
        <td colspan="2"><div class="form-field">河南省洛阳市老城区XX街道XX号</div></td>
      </tr>
      <tr>
        <th colspan="1">死因推断</th>
        <td colspan="3"><div class="form-field">急性心肌梗死</div></td>
        <th colspan="1">调查者签名</th>
        <td colspan="1"><div class="form-field">王医生</div></td>
        <th colspan="1">调查日期</th>
        <td colspan="2"><div class="form-field">2023年7月1日</div></td>
      </tr>
    </table>
    
    <!-- 备注信息 -->
    <div class="notes">
      <p>注：① 此表填写范围为在家、养老服务机构、其他场所正常死亡者；② 被调查者应为死者近亲或知情人；③ 调查时应出具以下资料：被调查者有效身份证件，居住地居委会或村委会证明，死者身份证和/或户口簿、生前病史卡。</p>
    </div>
    
    <!-- 操作按钮 -->
    <!-- <div class="controls">
      <button onclick="window.print()">打印证明书</button>
      <button onclick="clearForm()">清空表单</button>
    </div> -->
	<div class="actions">
	    <button class="action-btn print-btn" onclick="window.print()"">
	        <i class="fas fa-print"></i> 打印并预览
	    </button>
	    <button class="action-btn reset-btn" onclick="resetForm()">
	        <i class="fas fa-redo-alt"></i> 重置表单
	    </button>
	</div>
  </div>
	
  <script>
    function clearForm() {
      if(confirm('确定要清空所有表单内容吗？')) {
        document.querySelectorAll('.form-field').forEach(field => {
          field.textContent = '';
        });
      }
    }
  </script>
</body>
</html>